//
//  ByLoginCaptchaButton.m
//  beibei_ios
//
//  Created by mc on 16/4/27.
//  Copyright © 2016年 hebidu. All rights reserved.
//

#import "ByLoginCaptchaButton.h"
//#import "ByNetCodeModel.h"
@interface ByLoginCaptchaButton(){
    NSInteger _countdownTime;   // 倒计时剩余时间
    NSAttributedString *_title; // 可以点击获取验证码时的标题
}
@end
@implementation ByLoginCaptchaButton


// 自定义初始化方法
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.layer.cornerRadius = 0.4;
        
        // 创建标题label
        _captchaLabel = [[UILabel alloc] initWithFrame:self.bounds];
        [self addSubview:_captchaLabel];
        
        // 添加文字
        NSDictionary *attrDic = @{NSFontAttributeName:[UIFont systemFontOfSize:14],
                                  NSForegroundColorAttributeName:[UIColor blackColor]};
        _title = [[NSAttributedString alloc] initWithString:@"获取验证码" attributes:attrDic];
        _captchaLabel.attributedText = _title;
        _captchaLabel.backgroundColor = BY_THEME_COLOR;
        _captchaLabel.layer.cornerRadius = 4.0;
        _captchaLabel.textColor = [UIColor whiteColor];
        _captchaLabel.textAlignment = NSTextAlignmentCenter;

        
    }
    return self;
}




@end
